import request from "../../request";

const api = {
    payTotal: '/admin/pay/total-money',
    incomeTotal: '/admin/income/total-money',
    propertyTotal: '/admin/property/total-money',
    liabilitiesTotal: '/admin/liabilities/liabilities-total',
    payTotalMonth: '/admin/pay/month/total-monty',
    incomeTotalMonth: '/admin/income/month/total-monty'
}


/**
 * 家庭总收入
 * @returns {AxiosPromise}
 */
export function getIncomeTotal(){
  return request({
      url: api.incomeTotal,
      method: 'GET',
  })
}

/**
 * 家庭总支出
 * @returns {AxiosPromise}
 */
export function getPayTotal(){
    return request({
        url: api.payTotal,
        method: 'GET',
    })
  }

  /**
 * 家庭总负债
 * @returns {AxiosPromise}
 */
export function getLiabilitiesTotal(){
    return request({
        url: api.liabilitiesTotal,
        method: 'GET',
    })
  } 

  /**
 * 家庭总余额
 * @returns {AxiosPromise}
 */
export function getPropertyTotal(){
    return request({
        url: api.propertyTotal,
        method: 'GET',
    })
  }

/**
 * 获取一年内每个月的总收入
 * @returns {AxiosPromise}
 */
export function getIncomeTotalByEveryMonth(){
    return request({
        url: api.incomeTotalMonth,
        method: 'GET',
    })
  }

  /**
 * 获取一年内每个月的总支出
 * @returns {AxiosPromise}
 */
export function getPayTotalByEveryMonth(){
    return request({
        url: api.payTotalMonth,
        method: 'GET',
    })
  }

